<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>子数据字典</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />

<link rel="stylesheet" type="text/css" href="$request.getContextPath()/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="$request.getContextPath()/resources/bootstrap-table/css/bootstrap-table.min.css">
<link href="$request.getContextPath()/resources/bootstrap3-editable/css/bootstrap-editable.css" rel="stylesheet">
<link rel="stylesheet" href="$request.getContextPath()/resources/cws/system/ddl/subDDL.css" />
</head>
<body>
    <div class="container-fluid">
		<div id="toolbar">
			#if($shiro.hasPermission('system:ddl:datasetAdd'))
				<button type="button" class="btn btn-default btn-sm" onclick="addDDL('$!ddlCode','$!ddlName')"><span class="glyphicon glyphicon-plus"></span>添加</button>
			#end
		</div>
		<table id="subDDLTable" 
		    data-toolbar="#toolbar" 
		    data-show-refresh="true"
			data-search="false" 
			data-show-toggle="false" 
			data-show-columns="false"
			data-show-export="false" 
			data-id-field="ddlId" 
			data-show-export="false"
			data-pagination="false" 
			data-query-params="queryParams"
			data-query-type="limit" 
			data-show-footer="false"
			data-click-to-select="true" 
			data-single-select="false"
			data-striped="true" 
			data-method="get"
			data-url="$request.getContextPath()/system/ddl/ddlSet?ddlCode=$!ddlCode"
			data-side-pagination="server" 
			data-page-list="[10, 25, 50, 100, ALL]"
			data-show-pagination-switch="false" 
			data-id-field="userId"
			data-search-on-enter-key="true" 
			data-pagination-v-align="bottom"
			data-show-pagination-switch="false">
		</table>
	</div>
</body>
<script src="$request.getContextPath()/resources/jquery/jquery-3.1.0.min.js"></script>
<script src="$request.getContextPath()/resources/bootstrap/js/bootstrap.min.js"></script>

<script type="text/javascript" src="$request.getContextPath()/resources/layer/layer.js"></script>

<script type="text/javascript" src="$request.getContextPath()/resources/bootstrap-table/js/bootstrap-table.min.js"></script>
<script type="text/javascript" src="$request.getContextPath()/resources/bootstrap-table/js/bootstrap-table-editable.js"></script>
<script type="text/javascript" src="$request.getContextPath()/resources/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
<script type="text/javascript" src="$request.getContextPath()/resources/bootstrap-table/js/bootstrap-table-zh-CN.min.js"></script>

<script type="text/javascript">
	var datasetPermissionButtons=[];
	var datasetDeletePermission="$shiro.hasPermission('system:ddl:datasetDelete')";
	if(datasetDeletePermission&&datasetDeletePermission=="true"){
		datasetPermissionButtons.push('<button type="button" class="btn btn-default btn-sm deleteSubDDL"><span class="glyphicon glyphicon-trash"></span>删除</button>');
	}
	var datasetEditPermission="$shiro.hasPermission('system:ddl:datasetEdit')";
	if(datasetEditPermission&&datasetEditPermission=="true"){
		datasetPermissionButtons.push('<button type="button" class="btn btn-default btn-sm saveSubDDL"><span class="glyphicon glyphicon-ok"></span>保存</button>');
	}
</script>
<script type="text/javascript" src="$request.getContextPath()/resources/cws/system/ddl/subDDL.js"></script>
</html>